home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 24
/
Amiga Format AFCD24 (Feb 1998, Issue 108).iso
/
-seriously_amiga-
/
shareware
/
programming
/
other
/
apic
/
examples
/
if_test.asm
< prev
next >
Wrap
Assembly Source File
|
1998-01-05
|
667b
|
60 lines
list p=16c84,r=dec
num1 = 5
num2 = 5
; == equal
; != not equal
; >= Greater or equal
; <= Less or equal
; && Logical AND
; || Logical OR
;
if num1+num2 == 7
error "num1+num2 = 7
else
error "num1+num2 != 7"
endif
if (num1 != 3) && (num2 != 5)
error "num1 is not 3 and num2 not 5"
endif
if num1 < num2
error "num1 is less than num2"
else
error "num2 is not less than num1"
endif
if num1 <= num2
error "num1 is less or equal num2"
endif
if num1 >= num2
error "num1 is greater or equal num2"
endif
if num1 != num2
error "num1 is not equal num2"
endif
if (num1==5) || (num2 == 5)
error "num1 or num2 is 5"
endif